package com.springboot.autoconfigure.oss.config;

import com.springboot.autoconfigure.oss.service.OssApiService;
import com.springboot.autoconfigure.oss.service.impl.MinioOssApiServiceImpl;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Scope;

/**
 * 适配mini
 * @author zehua
 * @date 2023/8/10 15:28
 * @Description TODO
 * @since V1.1.0
 */
@Data
@Accessors(chain = true)
@Configuration
@ConfigurationProperties(prefix = "oss.minio")
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class MiniOSSPropertis extends AbstractOSSPropertis {

    private String endPoint;

    private String username;

    private String password;

    private String bucket;

    private String region;

    private Integer expiryTime;

    private String expiryTimeUnit;

    @Override
    public Class<? extends OssApiService> getImpl() {
        return MinioOssApiServiceImpl.class;
    }
}
